package net.xxcxcxcx.xc_enhancedmob.render.boss_bar.unit;

import net.minecraft.entity.mob.MobEntity;
import net.minecraft.nbt.NbtCompound;
import net.minecraft.text.Text;
import net.xxcxcxcx.xc_enhancedmob.packet.dirty.DataTracking;
import net.xxcxcxcx.xc_enhancedmob.render.boss_bar.unit.type.cover.BossBarCoverType;
import net.xxcxcxcx.xc_enhancedmob.render.boss_bar.unit.type.reality.BossBarRealityType;

import java.util.UUID;

/**
 * CustomBossBar的基础接口
 * <p>定义了CustomBossBar所必须实现的功能
 */
public interface CustomBossBar {
    //对于自定义数据的存储
    void writeCustomDataToNbt(NbtCompound nbt);

    //获取有修改的自定义数据的存储
    void writeDirtyCustomDataToNbt(NbtCompound nbt);

    //对于自定义数据的读取
    void readCustomDataFromNbt(NbtCompound nbt);

    //对于有修改的自定义数据的读取
    void readDirtyCustomDataFromNbt(NbtCompound nbt);

    DataTracking<UUID> getUuid();

    void setUuid(UUID uuid);

    DataTracking<Text> getName();

    void setName(Text name);

    DataTracking<Float> getMaxCount();

    void setMaxCount(float maxCount);

    DataTracking<Float> getNowCount();

    void setNowCount(float nowCount);

    DataTracking<Integer> getLayerCount();

    void setLayerCount(int layerCount);

    DataTracking<BossBarRealityType> getRealityType();

    void setRealityType(BossBarRealityType type);

    DataTracking<Boolean> getDarkenSky();

    void setDarkenSky(boolean darkenSky);

    DataTracking<Boolean> getDragonMusic();

    void setDragonMusic(boolean dragonMusic);

    DataTracking<Boolean> getThickenFog();

    void setThickenFog(boolean thickenFog);

    boolean getDirty();

    void setDirty(Boolean dirty);

    DataTracking<Boolean> getNeedMeterCover();

    void setNeedMeterCover(boolean needMeterCover);

    DataTracking<BossBarCoverType> getMeterCoverType();

    void setMeterCoverType(BossBarCoverType meterCoverType);

    void tick(MobEntity mobEntity);

    DataTracking<Integer> getSortCount();

    void setSortCount(int sortCount);
}
